import { createApp } from 'vue'
import pinia from './stores'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import './styles/index.scss'
import ElSvg from './components/SvgIcon/ElSvg'
import './permission'
import CategorySelector from "@/components/CategorySelector/index.vue"
import vueEcharts from "vue-echarts"

//引入mock服务器
import "./mockServer"
const app = createApp(App)
//注册全局组件 
app.component(CategorySelector.name, CategorySelector)
//注册一个全局组件
app.component('v-chart', vueEcharts)

ElSvg(app)

app.use(pinia)
  .use(router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount('#app')
